package com.idealighter.game.core.dao.generate.mapper;

import com.idealighter.game.core.dao.generate.domain.PlayerGameInfoDomain;
import com.idealighter.game.core.dao.generate.domain.PlayerGameInfoDomainExample;
import com.idealighter.game.core.dao.generate.domain.PlayerGameInfoDomainWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PlayerGameInfoDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerGameInfoDomainSqlProvider.class, method="countByExample")
    long countByExample(PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @DeleteProvider(type=PlayerGameInfoDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Delete({
        "delete from player_game_info",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Insert({
        "insert into player_game_info (player_id, prize_pools, ",
        "items)",
        "values (#{playerId,jdbcType=BIGINT}, #{prizePools,jdbcType=LONGVARCHAR}, ",
        "#{items,jdbcType=LONGVARCHAR})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(PlayerGameInfoDomainWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @InsertProvider(type=PlayerGameInfoDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(PlayerGameInfoDomainWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerGameInfoDomainSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="prize_pools", property="prizePools", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="items", property="items", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<PlayerGameInfoDomainWithBLOBs> selectByExampleWithBLOBs(PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerGameInfoDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT)
    })
    List<PlayerGameInfoDomain> selectByExample(PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Select({
        "select",
        "id, player_id, prize_pools, items",
        "from player_game_info",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="prize_pools", property="prizePools", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="items", property="items", jdbcType=JdbcType.LONGVARCHAR)
    })
    PlayerGameInfoDomainWithBLOBs selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerGameInfoDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PlayerGameInfoDomainWithBLOBs record, @Param("example") PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerGameInfoDomainSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") PlayerGameInfoDomainWithBLOBs record, @Param("example") PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerGameInfoDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PlayerGameInfoDomain record, @Param("example") PlayerGameInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerGameInfoDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PlayerGameInfoDomainWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update player_game_info",
        "set player_id = #{playerId,jdbcType=BIGINT},",
          "prize_pools = #{prizePools,jdbcType=LONGVARCHAR},",
          "items = #{items,jdbcType=LONGVARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(PlayerGameInfoDomainWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_game_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update player_game_info",
        "set player_id = #{playerId,jdbcType=BIGINT}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(PlayerGameInfoDomain record);
}